Sablonvita:Tooltip
Documentation The template creates a WoW styled tooltip for items; you can supply any number of the named parameters to display specific text in the tooltip. Required Minimal Syntax Begin all item-page tooltips with the following three lines: } |mode= } |arg= } All item-page tooltips should end with the following line: }} The template parameters displayed here are required to enable item pages interact with other consumers of tooltip data, and do not change from page to page. Named parameters Display modes Passing |mode= to the template (and, by extension to the item page syntax, any item page) affects how the template renders the tooltip. There are several valid mode values: ;home / away :Displays the tooltip as if on its item page (home) or not on its item page (away). If mode is omitted, the appropriate one of those is chosen by default. ;link / imlink :Return an item link (link) or an item link with an image (imlink) instead of the tooltip. ;arg (in combination with |arg=) :Returns the value of }|--}}}, evaluated in the tooltip's context. "type" and "slot" values List of values that appear in tooltips. ; type :Arrow, Axe, Bow, Bullet, Cloth, Crossbow, Dagger, Fishing Pole, Fist Weapon, Gun, Idol, Leather, Libram, Mace, Mail, Plate, Polearm, Shield, Staff, Sword, Thrown, Totem, Wand. ; slot :Back, Chest, Feet, Finger, Hands, Head, Held In Off-hand, Legs, Main Hand, Neck, Off Hand, One-Hand, Projectile, Ranged, Relic, Shirt, Shoulder, Tabard, Thrown, Trinket, Two-Hand, Waist, Wrist. List of Archived Talk discussions * Template talk:Tooltip/Archive01: Up to and including June 2007. * Template talk:Tooltip/Archive02: Up to and including May 2008. Arena rating What's the option for: "Requires personal and team arena rating of XXXX"? :Abuse |req= for now, I think. -- foxlit (talk) 20:53, 11 June 2008 (UTC) ::Made it |rating=. Just give it a number value and it'll print the rest. 22:01, 12 July 2008 (UTC) Double-quotes in name messing with float/font I saw this problem with . Apparently using " instead of "-mark works. -- Fandyllic (talk · ) 9:48 AM PST 23 Jun 2008 Cooldown format There should be a standard format for the Cooldown= entry, perhaps a template like cost. I've seen Cooldown= nn min and Cooldown= nn minutes. I think both work because they are transposed as text, there is no interpretation, but standardizing would be better. Madkaugh (talk) 21:20, 8 September 2008 (UTC) Non PNG File Extensions Seems in past discussions this was brought up, but still appears to be unresolved. For example, if you take an icon from wowhead, you'll have to convert it from JPG to PNG, yet the file uploader will take many non-PNG formats. It seems like such a popular template should be congruent with the upload feature. Howbizr (talk) 02:51, 21 September 2008 (UTC) :We intentionally use .png for all of our in-game icons because it makes the rest of our templates/page-creation bots that use wow icons a lot easier to deal with. :The file uploader takes all kinds of images because we use more than just WoW icons... --k_d 05:38, 21 September 2008 (UTC) Achievement Tooltip Ideas Shafted! Shoot 10 players with the . Criteria: - 10x Silver Shafted Arrow. Fool For Love Complete the Love is in the Air achievements listed below. Criteria: Heartmender Shafted! Flirt with Disaster Lonely? Nearest and Dearest The Rockets Pink Glare Nation of Adoration Fistfull of Love Perma-Peddle Sweet Tooth Be Mine My Love is Like a Red, Red Rose I Pitied the Fool Rewards: *Title Reward: I had some ideas. Just wanted to share, if you want to adopt into the stylesheet / template. Here's an example of a regular achievement, as well as an achievement made up of other achievements. -Howbizr (talk) 20:04, 21 October 2008 (UTC) :This should be made into a new template if created at all. This template is strictly for items. -- 20:08, 21 October 2008 (UTC) Best current practice for usage I notice that there's some inconsistency between common usage, the example at the top of this page, and the boilerplate. On this page, we have: } |mode= } |arg= } has: } |arg= } ... }} The boilerplate definitely needs some tweaking so that it works more reasonably with subst (currently the onlyinclude wrapper and standard setup for mode and arg are lost in the subst). The item pages have a mixture of styles, a few of them are even missing onlyinclude/noinclude, causing breakage when used with, e.g. . Some use noinclude around the rest of the page, some wrap the tooltip with onlyinclude. I reckon onlyinclude is the better style, as it's less prone to someone less experienced incorrectly putting something outside the noinclude block. But what about }. I can see the utility of the latter, allowing an alternate template to be used when transcluding the page. Is that meant to be the standard, and should we be changing the existing articles to that standard? I've got all the necessary framework and regexps available with MurphBot, from standardising and fixing the usage, and it is very easy to adapt that to that to this template (although I do realise the scale of usage is significantly larger). Would it be desirable to have a bot standardise the usage to best practice (ensuring there's an onlyinclude wrapper, removing old noinclude wrappers, and ensuring that the required minimum parameters are present in standard form)? If so, does the following represent our desired standard usage? } |mode= } |arg= } ... }} -- 11:46, 24 December 2008 (UTC) :What I've understood so far is that } is for Foxbot to easily change the tooltips. The has mostly been used in tooltips from older items. I don't believe that newer items has been using noinclude. is what should be used. :On using bots to eliminate noinclude in favor of onlyinclude: I think that's very hard to do since there's articles that aren't items but use noinclude anyway. I'd let someone who knows more about bot editing to comment on that, thoug. 12:07, 24 December 2008 (UTC) ::Thanks. As far as restricting the elimination of noinclude to item pages, that's easy enough, as long as it is sufficient to restrict it to pages which actually include usage of (and not pages which transclude pages which have the template). The python regexps which should achieve that are: :: '(?msi)(?<= })(.*?)' -> '\1' :: '(?msi)(?=.* })' -> '' ::Are there any examples of pages which are not items, but do have in them? ::And not wanting to produce a controversial tangent here (if it's to be discussed, somewhere else would be more appropriate), but this is something that would be made more certain (ensuring that you're only processing items) if the items were in their own namespace or pseudo-namespace. ::-- 12:31, 24 December 2008 (UTC) : Just to clear things up: } was inserted by Foxbot, but the actual use is as Murph described: allow a different template to receive all of the tooltip arguments on transclusion. The syntax is desired behavior, and I've now updated the preload page to reflect this. -- foxlit (talk) 10:34, 27 February 2009 (UTC) Feral attack power Inspired by something on the Village Pump I noticed way too late, and ultimately Wowhead's new way of displaying Feral attack power http://www.wowhead.com/?item=40388, I used my basic wiki skills to come up with a suggestion how to implement that on our tooltip template here (for Staves/Polearms/2H-Maces over 54.8 DPS only) I'd just be bold, but I'm unsure about just copying Wowhead's 'design'. (As a European, I expect just about anything from the US legal system ) Plus, others might not like it/have better ideas. The previous FAP weapons need to be updated anyway, new DPS, Strength to AP, I'd do that as soon as I hear a 'yes' here. Hopefully Google helps me find all of them. ~ Nathanyel (talk) 14:16, 22 February 2009 (UTC) : Gourra made a point on the Village Pump that WoWWiki tooltips should look like ingame tooltips, and not like Wowhead ones. So another option would be to simply have FAP displayed as ingame, though the green might confuse non-druids. Then again, who can't read "in Cat, Bear, Dire Bear, and Moonkin forms only"? Anyway, I'd hope for at least a "go for it" before I get going ~ Nathanyel (talk) 17:57, 2 March 2009 (UTC) :: If the goal is to "make wowwiki tooltips look like in-game tooltips", then you're going to need to know the race and class of the viewer, and what weapons he can wield. Those things are taken into account when the in-game engine renders the tooltip ("Mace" will be in red or white, depending on whether the character can wield a mace). But you don't make any attempt to do that in wowwiki, because the viewer is not in-game, and those decisions don't apply. Thus applying that rule to the Feral Attack Power rating isn't sensible either. I like how wowhead uses an orange color to make it stand out; it's clear that it's something that is not done in-game. I see no problem copying their style, as long as you don't copy their code. The old "Look & Feel" argument was settled long ago in courts, when Apple lost their lawsuit against Microsoft. There is nothing illegal about copying "use orange text to indicate that feral attack power is different and only applies to druids". Please do copy wowhead. Markkawika (talk) 20:35, 2 March 2009 (UTC) ::: Now that's good feedback, never thought of the "mace in red" thing - I guess what WoWWiki (or Wowhead) should/is trying to display is the item from an omniscient point of view, level 80 character of all classes, with all weapon and trade skills maxed out. Anyway, will get to it after lunch. ~ Nathanyel (talk) 10:11, 3 March 2009 (UTC) :::: Oh wait, I can't edit myself... Would someone with the proper rights do that please? Here's the diff with what needs to be added. Gonna go ahead and update the former feral weapons already. ~ Nathanyel (talk) 12:50, 3 March 2009 (UTC) ::::: This edit has an error, and causes "Expression error: Unexpected > operator" to appear in every page that uses this tooltip. Would some kind soul with the proper authority fix this please? --Hops Splurt (talk) 15:34, 3 March 2009 (UTC) :::::: Which article are you talking about? I don't see any errors so far with the tooltip. -- 15:41, 3 March 2009 (UTC) :::::: Should be fixed now. -- 16:06, 3 March 2009 (UTC) ::::: And done, at least with those weapons Google came up with. Searching for others soon. Would you believe how many distractions can come up during the course of an afternoon? Noticed some ±1 AP disparities on some green Outland random-stat staves plus , but 1 AP is virtually nothing in Outland content and upwards. ~ Nathanyel (talk) 18:58, 3 March 2009 (UTC) No level requirement I've run across items with no level requirement having level=1 in the WoWWiki tooltip. This is indirectly correct, but is really not the same thing as no level requirement - the tooltip display is different. Am I correct that if the item does not have an explicit level 1 requirement in the in-game tooltip, these should be removed, per note above, "make wowwiki tooltips look like in-game tooltips"? For this particular bit of data, The Armory should be a reliable source. Madkaugh (talk) 01:17, 3 March 2009 (UTC) :Yes, that's correct. -- 02:21, 3 March 2009 (UTC)